package com.example.chatinterface;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.util.Log;

import java.util.ArrayList;
import java.util.Date;

public class MainActivity extends AppCompatActivity {

    private RecyclerView recyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);



        recyclerView = findViewById(R.id.recyclerView);
        Log.i("111111111111111", recyclerView.toString());

        ArrayList<Msg> list = new ArrayList<>();
        Date date = new Date();
        list.add(new Msg(1L, "张三", "1时客户端的功夫回复u都i法国欧服固定方式规划局哦对司法规划", date, true, true));
        list.add(new Msg(2L, "张三", "2时客户端的功夫划局哦对司法规划", date, true, false));
        list.add(new Msg(3L, "张三", "3时客户端的功夫回复u都i法国欧服固定方式规划局哦对司法规划", date, true, false));
        list.add(new Msg(4L, "张三", "4时客服固定方式规划局哦对司法规划", date, false, false));
        list.add(new Msg(5L, "张三", "5局哦对司法规划", date, false, false));
        list.add(new Msg(6L, "张三", "6固定方式规划局哦对司法规划", date, true, false));
        list.add(new Msg(7L, "张三", "7时客户端的功夫sh wrthwrthehrtrh erh i法国欧服固定方式规划局哦对司法规划", date, true, false));
        list.add(new Msg(8L, "张三", "8时客户端的功", date, false, false));

        recyclerView.setAdapter(new MsgRecyclerViewAdapter(list));

    }
}